1. Field of the Invention
This invention relates to an apparatus for processing the data of a character, pictorial image or the like (hereinafter called "character"), the apparatus storing the outline shape of the character so as to compress the amount of stored data. In particular, this invention provides an apparatus for classifying the outline of the character into straight lines and curved lines and further shifting a sampling point candidate on the curved portion in trial and error. It is determined based on deviation .epsilon. obtained every outline point within a sampling candidate segment, whether the above trial and error is effected and in which direction the sampling point candidate is advanced or retraced. Then the curved portion is split into a plurality of sampling segments with establishing the sampling segments in turn from the start point of the curved portion, and thereby the straight portion and each sampling segment being stored.
2. Description of the Prior Art
It is well known that binary data obtained by resolving a character into dots has an extremely high redundancy. In order to reduce such redundancy, there have been proposed a variety of data compression techniques heretofore.
One of the prior data compression techniques is a so-called outline method which compresses the quantity of data by grasping the shape of a character in accordance with its outline and storing the data that specify the outline.
In the data compression carried out on the basis of such outline method, there are known the procedure of straight line (vector) approximation shown in FIG. 1 and n-degree curve approximation shown in FIG. 2.
The straight line approximation illustrated as an example in FIG. 1 is based on the techniques disclosed in
U.S. Pat. No. 4,199,815 (Ser. No. 905,451; Kyte et al.; JP Laid-open No. 149522/1979)
U.S. Pat. No. 4,254,468 (Division of Ser. No. 905,451; Craig)
U.S. Pat. No. 4,298,945 (Division of Ser. No. 905,451; Kyte et al.)
U.S. Pat. No. 4,338,673 (Ser. No. 181,808; Brown; JP Laid-open No. 79154/1980)
Summarizing the above techniques, the data compression is achievable in such a manner that an outline 1 of a character plotted by a dotted line is first approximated with a set of vectors 2 represented by solid lines, and the information for specifying each vector (position of start point, length and inclination, or horizontal and vertical components) is used as encoded data.
Another example of n-degree curve approximation illustrated in FIG. 2 is the method contrived by the present applicant as disclosed in U.S. Pat. No. 4,511,893 (JP Laid-open No. 39963/1982). According to this technique, as will be described later, the quantity of data is compressed by storing the coordinates of a group of points P established suitably on the outline of a character, and a desired outline is approximated with an n-degree curve 3 which connects (n+1) points in succession. The graph of FIG. 2 represents an exemplary case where n=2.
The feature of the data compression based on such outline method resides in that, when reproducing a character image by decoding the compressed data thereof, the image reproduction is attainable with a variety of scale factors by executing interpolation, thinning-out or conversion of a vector scale factor.
In such prior methods mentioned above, however, there exists an essential disadvantage that an optimal result is not guaranteed with regard to the smoothness of the outline (continuity in inclination of the outline), as is obvious from the example of FIG. 1 where the start points and end points P of the individual vectors are rendered discontinuous, and also from another example of FIG. 2 where the inclination angles .delta. of the left and right tangential lines on the two sides of each break point P.sub.c of the n-degree curves 3 are rendered discontinuous.
In contrast therewith, the outline of a character generally has both straight and curved portions while being continuous itself and further has such contour characteristics that its first-degree derived function (inclination of outline) varies continuously with the exception of some peculiar points including an intersection of constituent lines of the character and a tapered end of a character portion called "hane".
Consequently, it is unavoidable that the data compression executed by the conventional outline method involves some problems such as difficulties in attaining satisfactory compressed data that specify the outline faithfully and also in accurately eliminating the unnaturalness (discontinuity in inclination) of the character image reproduced on the basis of such compressed data.
In an attempt to solve the problems mentioned above, the present applicant previously developed an improved method as disclosed in U.S. Pat. No. 4,542,412 (JP Laid-open No. 134745/1983).
However, the above data compression method which is a kind of outline method still has the following disadvantages.
(1) As a result of the attempt to approximate the entire sampling segments in an arbitrary block at a time, a rugged contour is prone to be formed with a deviation from the original outline at a point of connection in any region where a straight portion and a curved portion are connected to each other. And the straight-line reproducibility is deteriorated since an outline portion to be reproduced as a straight line is affected harmfully by the approximated curves in the sampling segments anterior and posterior thereto.
(2) For avoiding such drawbacks, a greater number of sampling points need to be established with the requirement of division into many polynomials to execute the approximation, whereby the quantity of data is increased eventually.
(3) Furthermore, it has also been found that due to the action of approximating the individual sampling segments in an arbitrary block at a time, when a new sampling point is established, the approximate curves in the other sampling segments are thereby affected to be eventually varied.
(4) And each time a new sampling point is established, it becomes necessary to redetermine the approximate curves with respect to the entire sampling segments in the related block, and complicated computation is required for encoding the data, whereby a considerable period of time is needed to produce the desired data.